.class Lcom/netease/newsreader/activity/CollectDeleteActivity$2;
.super Ljava/lang/Object;
.source "CollectDeleteActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/activity/CollectDeleteActivity;->updateViewContent()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/CollectDeleteActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    .line 145
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 10
    .parameter "v"

    .prologue
    const/4 v9, 0x3

    const/4 v8, 0x2

    const/4 v6, 0x0

    const/4 v7, 0x1

    .line 150
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v4

    if-ne v4, v8, :cond_0

    .line 151
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$2(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectPicturesAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/netease/newsreader/util/CollectPicturesAdapter;->getSelectNums()I

    move-result v1

    .line 158
    .local v1, selectNum:I
    :goto_0
    if-gtz v1, :cond_1

    .line 159
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    .line 160
    const-string v5, "\u6ca1\u6709\u9009\u4e2d\u4efb\u4f55\u9009\u9879\uff0c\u4e0d\u80fd\u8fdb\u884c\u5220\u9664\u64cd\u4f5c"

    .line 159
    invoke-static {v4, v5, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v4

    .line 160
    invoke-virtual {v4}, Landroid/widget/Toast;->show()V

    .line 183
    :goto_1
    return-void

    .line 153
    .end local v1           #selectNum:I
    :cond_0
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$3(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectArticleAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/netease/newsreader/util/CollectArticleAdapter;->getSelectNums()I

    move-result v1

    .restart local v1       #selectNum:I
    goto :goto_0

    .line 163
    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    .line 164
    .local v2, sql:Ljava/lang/StringBuilder;
    const/4 v0, 0x0

    check-cast v0, [Ljava/lang/String;

    .line 166
    .local v0, conditions:[Ljava/lang/String;
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v4

    if-ne v4, v9, :cond_2

    .line 167
    const-string v4, "("

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "collect_type"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " =? or "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "collect_type"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    .line 168
    const-string v5, " =? ) and "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "ischecked"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "=1"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 170
    new-array v0, v8, [Ljava/lang/String;

    .end local v0           #conditions:[Ljava/lang/String;
    invoke-static {v9}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v0, v6

    const/4 v4, 0x4

    invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v0, v7

    .line 177
    .restart local v0       #conditions:[Ljava/lang/String;
    :goto_2
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    iget-object v4, v4, Lcom/netease/newsreader/activity/CollectDeleteActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v5, "collect_table"

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v4, v5, v6, v0}, Landroid/database/sqlite/SQLiteDatabase;->delete(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

    move-result v3

    .line 179
    .local v3, summ:I
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    .line 180
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "\u5220\u9664"

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "\u6761\u8bb0\u5f55"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 179
    invoke-static {v4, v5, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v4

    .line 180
    invoke-virtual {v4}, Landroid/widget/Toast;->show()V

    .line 181
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-virtual {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->finish()V

    goto/16 :goto_1

    .line 173
    .end local v3           #summ:I
    :cond_2
    const-string v4, "collect_type"

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, " =? and "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "ischecked"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "=1"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 174
    new-array v0, v7, [Ljava/lang/String;

    .end local v0           #conditions:[Ljava/lang/String;
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$2;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v0, v6

    .restart local v0       #conditions:[Ljava/lang/String;
    goto :goto_2
.end method
